<?php
## process tab
if(!isset($_GET['tab']) || $_GET['tab']=="info")
{
	$m_tabInfo = 'class="active"';
	$div_tab = 'class="fivetab tourinfo"';
} 
else if($_GET['tab']=="price") 
{
	$m_tabPrice = 'class="active"';
	$div_tab = 'class="fivetab"';
}
else if($_GET['tab']=="photo") 
{
	$m_tabPhoto = 'class="active"';
	$div_tab = 'class="fivetab photo"';
}
else if($_GET['tab']=="term") 
{
	$m_tabTerm = 'class="active"';
	$div_tab = 'class="fivetab"';
}
else if($_GET['tab']=="guest") 
{
	$m_tabGuest = 'class="last active"';
	$div_tab = 'class="fivetab review"';
}


## lay bai viet
$args = db_query_all_post_in_post_type(1, 'hotel', 'date', 'DESC', $wpdb->prefix.'display', 'display');
query_posts($args);
if(have_posts())
{
	the_post();
	$postID = get_the_ID();
}
?>
<div id="content-right">
        	<div <?php echo $div_tab;?>>
             <span class="iconhome"></span>
             <div class="btbreakcumb">
             <?php bt_breadcrumb();?>
             </div>
             <h1><?php the_title();?></h1>
             <a href="#" name="go_terms"></a>
           	<ul class="menu-info">
            	<li><a <?php echo $m_tabInfo;?> href="?tab=info">Info</a></li>
                <li><a <?php echo $m_tabPrice;?> href="?tab=price">Price</a></li>
                <li><a <?php echo $m_tabPhoto;?> href="?tab=photo">Photo</a></li>
                <li><a <?php echo $m_tabTerm;?> href="?tab=term">Terms & Conditions</a></li>
                <li><a <?php echo $m_tabGuest;?> href="?tab=guest">Guest Reviews</a></li>
            </ul>
              <?php 
              if(!isset($_GET['tab']) || $_GET['tab']=="info")
              {
              	require_once TEMPLATEPATH.'/views/detailhotel/view-info.php';
              }
              else if($_GET['tab']=="price") 
              {
              	require_once TEMPLATEPATH.'/views/detailhotel/view-price.php';
              }
              else if($_GET['tab']=="photo") 
              {
              	require_once TEMPLATEPATH.'/views/detailhotel/view-photo.php';
              }
              else if($_GET['tab']=="term") 
              {
              	require_once TEMPLATEPATH.'/views/detailhotel/view-term.php';
              }
              else if($_GET['tab']=="guest") 
              {
              	require_once TEMPLATEPATH.'/views/detailhotel/view-guest.php';
              }
              ?>     		
			</div>
        </div>